1. Field of the Invention
Embodiments of the present invention generally relate to computers. More particularly, embodiments relate to methods and systems for parallel updates of computer databases.
2. Background of the Invention
It is generally known that data may be stored in a tabular form. Conceptually, tables are comprised of multiple records. In a two-dimensional table, each record is associated with one row. Each row may comprise one or more cells. Columns in the table each represent a specific field with the same meaning for all records. As used herein, tables are equivalent to database tables and accordingly, rows may be referred to alternatively as “rows” or “records,” or “database records.” Columns may be referred to alternatively as “columns” or “fields.” For purposes of description herein, a first row in a table is called a “header row.” The cells of the header row may contain a description or identification of the content of the cells below it.
FIG. 1 is a prior art table 100 illustrating a first column 102 having a header cell 104 identified as “Cost Center” and a second column 106 having a header cell 108 identified as “Amount.” The table 100 illustrates n records, where n is any positive nonzero integer.
The data stored in tables may be provided as input to numerous reports. Some reports, for example, may summarize the data stored in the many fields in a table. The reports may be useful for such things as tracking the objectives of a business or the availability of commodities. Examples of business objectives may include the total amount of costs attributed to a cost center in a certain month or over a certain period, the amount spent on servicing multiple accounts, or the year to date income from all sources to a cost center. Examples of availability of a commodity may include the number of toy rockets available for purchase from all stores in a nationwide chain of stores. These examples are meant to be illustrative and not limiting.
Generally, and for purposes of description herein, data in a table may be accessed either by an individual process or by a mass process. An individual process may be a dialog session in which an individual user gains access to the table for purposes that may include generating reports or updating the table. For example, the user may have an invoice verification application where the user may post an invoice for a given cost center. Such an application will typically require the entry of cost center identification information and invoice amount into a dialog box on a computer interface unit, such as a keyboard and video terminal. The entry will result in a change in value of a cell of a record, associated with the cost center. A mass process, on the other hand, may be exemplified as a background process run for a multitude of entries. For example, a mass process may post debit memos to the table for all customers. In mass processes, one may receive the information via an electronic file. This file may be processed in the background. In fact, more than one file may be received and may run in parallel. Each file in a mass process file may contain several hundred or several thousand postings for execution.
It is conceivable that mass processes running in parallel may be accomplishing the same task (e.g., posting invoices or payments in parallel). In one example, when a first process accesses the table to change a specific record in the table, the first process may be given exclusive control of the specific record; other processes will not be able to edit the specific record while it is under the exclusive control of the first process. Only after the first process has relinquished its exclusive control of the record will other processes be able to again edit this record. In a system used by more than one user or accessed by more than one process, the ability of multiple users or processes to gain access to any given record is problematic and may cause a bottleneck if the multiple users or processes attempt to access or use the same record contemporaneously. A typical solution may involve a database administration system, which may form a single queue for the multiple parallel processes, where each of the multiple parallel processes waits in the queue for its turn to serially update (e.g., sum or input data to) the subject record.